//
//  EARecommendMealCell.m
//  WhatToEat
//
//  Created by 方力 on 15/10/31.
//  Copyright (c) 2015年 Mac. All rights reserved.
//
#import "ConstansCode.h"
#import "EARecommendMealCell.h"

@implementation EARecommendMealCell

- (void)awakeFromNib {

    self.backgroundColor=kWhiteColor;
    
    self.selectionStyle=UITableViewCellSelectionStyleNone;

//    UITableViewCellSeparatorStyle
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

- (IBAction)addLessenActions:(UIButton *)sender
{
    switch (sender.tag) {
        case 1:
            
            self.num--;
            
              //self.minusBlock(@"repair");
            if (self.num==0) {
                
                self.minusBlock(@"remove");
                
            }else
            {
            
                self.minusBlock([NSString stringWithFormat:@"%d",self.num]);
            
            }
            
            
            break;
            
        case 2:
               self.num++;
            
             self.minusBlock([NSString stringWithFormat:@"%d",self.num]);
            break;
            
        default:
            break;
    }
    
    
    
}
-(void)setNum:(int)num
{

    _num=num;
    
    
    self.numberLabel.text=[NSString stringWithFormat:@"X%d",self.num];
    

}


-(void)setHeadImageURL:(NSString *)headImageURL

{
    _headImageURL=headImageURL;
    
    
    [self.headImageView setImageWithURL:[NSURL URLWithString:headImageURL]];


}
@end
